import React, { useState } from 'react';
import AddGonggaoModule from './components/AddGonggaoModule'
import {
    NoticeListAll
} from './style'
import { PageHeader, Button } from 'antd'

/**
 * @description: 发布公告列表
 * @author: xiaoxujs
 * @updata: xiaoxujs（2021-08-10）头部编写
 */

const NoticeList = () => {
    const [addGonggaoModuleShow, setAddGonggaoModuleShow] = useState(false);
    const handleAddGonggao = () => {
        setAddGonggaoModuleShow(true)
    }
    return <NoticeListAll>
        <PageHeader
            className="site-page-header"
            title="公告管理"
            extra={[
                <Button key="1" type="primary" onClick={() => handleAddGonggao()}>
                    添加公告
                </Button>,
            ]}
        />
        <AddGonggaoModule
            addGonggaoModuleShow={addGonggaoModuleShow}
            setAddGonggaoModuleShow={setAddGonggaoModuleShow}
        />
    </NoticeListAll>
}

export default NoticeList